package com.ls.task.biz;

import org.quartz.SchedulerException;

import com.ls.task.bean.QuertzStatus;

public interface QuertzBiz {

	/**
	 * 调用器状态
	 * @return
	 */
	QuertzStatus status();

	/**
	 * 调用
	 * @param taskId
	 */
	void fire(Long taskId) throws SchedulerException;

	/**
	 * 调用
	 */
	void fire() throws SchedulerException;

	/**
	 * 恢复任务触发器
	 * @param triggerId
	 */
	void resumeTriggers(Long... triggerId) throws SchedulerException;
	/**
	 * 恢复任务
	 * @param taskId
	 */
	void resumeJobs(Long... taskId) throws SchedulerException;
	
	/**
	 * 暂停任务触发器
	 * @param triggerId
	 */
	void pauseTriggers(Long... triggerId) throws SchedulerException;
	
	/**
	 * 暂停任务
	 * @param taskId
	 */
	void pauseJobs(Long... taskId) throws SchedulerException;
	
	/**
	 * 删除相关的多个job任务
	 */
	void deleteJobs(Long... taskId) throws SchedulerException;
	
	/**
	 * 重新恢复触发器相关的job任务 
	 */
	void rescheduleJob(Long... triggerId) throws SchedulerException;
	
	/**
	 * 停止调度多个触发器相关的job
	 */
	void unscheduleJobs(Long... triggerId) throws SchedulerException;
	
	/**
	 * 添加调度的job信息
	 */
	void scheduleJobs(Long... triggerId) throws SchedulerException;
	
	/**
	 * 关闭调度信息
	 */
	void shutdown() throws SchedulerException;
	
	/**
	 * 启动一个调度对象
	 */
	void start() throws SchedulerException;

	void pauseAllJobs() throws SchedulerException;

	void pauseAllTriggers() throws SchedulerException;

	void resumeAllJobs() throws SchedulerException;

	void resumeAllTriggers() throws SchedulerException;

	void addJobs(Long... taskId) throws SchedulerException;
}
